package com.qf.service.impl;

import com.qf.mapper.UserMapper;
import com.qf.pojo.User;
import com.qf.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    public User logIn(String name, String password) {
        return userMapper.selectOne(name,password);
    }

    @Override
    public int regist(User user) {
        return userMapper.insertOne(user);
    }

    @Override
    public User getPass(String username) {
        return userMapper.selectByName(username);
    }
}
